package polarity;

import java.util.Hashtable;
import java.util.TreeMap;

public class PolarityManager
{
	Polarity polarityPositive = new Polarity();
	Polarity polarityNegative = new Polarity();
	Polarity polarityNeutral = new Polarity();
	Polarity polarityIrrelevant = new Polarity();
	
	private Hashtable<String,Polarity> polarityHt = new Hashtable<String,Polarity>();
	
	private int numberOfTweet = 0;
	/**
         * Retourne la liste des polarites
         * @return 
         */
	public Hashtable<String, Polarity> getPolarityHt() { return polarityHt; }
	
	private TreeMap<String, Integer> vocabulary = new TreeMap<String, Integer>();
	
        /**
         * retourne le vocabulaire
         * @return 
         */
	public TreeMap<String, Integer> getVocabulary() { return vocabulary; } 
	
        /**
         * Constructeur
         */
	public PolarityManager()
	{
		polarityHt.put("positive", polarityPositive);
		polarityHt.put("negative", polarityNegative);
		polarityHt.put("neutral", polarityNeutral);
		polarityHt.put("irrelevant", polarityIrrelevant);
	}
	
        /**
         * retourne le nombre de mots differents
         * @return 
         */
	public int getNumberOfDifferentWords()
	{
		return vocabulary.size();
	}
	
        /**
         * retourne le nombre de tweets
         * @return 
         */
	public int getNumberOfTweet() { return numberOfTweet; }

        /**
         * augmente le nombre de tweets de 1
         */
	public void incNumberOfTweet() { numberOfTweet++; }

}
